<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<!-- 
  父组件向子组件传值
 -->

<body>
  <div id="app">
    <div>{{msg1}}</div>
    <!-- 在父组中将值传递给子组件 -->
    <meuns title="来自父组件的值"></meuns>
    <!-- 通过动态的绑定一个值来传递给子组件 -->
    <meuns :title="ptitle"></meuns>
    <meuns :title="ptitle" content="hello"></meuns>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    let meuns = {
      "props": ["title", "content"], //接受父组件传来的值
      data() {
        return {
          "msg": "这是本身的数据"
        }
      },
      methods() {},
      "template": `<div>{{msg}} === {{title}} === {{content}}</div>`
    };
    const vm = new Vue({
      "el": "#app",
      "data": {
        "msg1": "这是大家都关心的事情了",
        "ptitle": "我是通过动态绑定的值了"
      },
      mounted() {},
      updated() {},
      "methods": {},
      "directives": {},
      "computed": {},
      "watch": {},
      "filters": {},
      "components": {
        meuns
      }
    });
  </script>

</body>

</html>